from django.conf import settings
from django.db.models import CharField, ForeignKey, CASCADE, SET_NULL,DateField,DecimalField

from vadmin.op_drf.models import CoreModel


# 继承框架封装的 模型类 CoreModel
class Project(CoreModel):
    name=CharField(max_length=64,verbose_name='名称')
    date = DateField(verbose_name='成交日期')
    price = DecimalField(max_digits=50, decimal_places=2, verbose_name='成交价')
    num = DecimalField(max_digits=50, decimal_places=2, verbose_name='成交量')
    money = DecimalField(max_digits=50, decimal_places=2, verbose_name='成交额')
    addr = CharField(max_length=64, verbose_name='成交地点')
    
    class Meta:
        verbose_name = '类模板'
        verbose_name_plural = verbose_name

    def __str__(self):
        return f"{self.name} 管理"